import request from '../request.js'

// 钱包列表
function list(query) {
    return request.get('/api/wallet/list', query)
}

// 钱包详情
function detail(query) {
    return request.get('/api/wallet/detail', query)
}

// 查询余额
function balance(query) {
    return request.get('/api/wallet/balance', query)
}

// 划转
function transfer(query) {
    return request.post('/api/wallet/accountTransfer', query, true)
}

// 钱包流水记录
function logList(query) {
    return request.get('/api/walletLog/list', query)
}

// 充值记录
function logRecharge(query) {
    return request.get('/api/walletLog/recharge', query)
}

// 提现记录
function logWithdrawal(query) {
    return request.get('/api/walletLog/withdrawal', query)
}

function logDetail(query) {
    return request.get('/api/walletLog/detail', query)
}

function withdrawal(data) {
    return request.post('/api/crypto/withdrawal', data)
}

export default {
    list,
    detail,
    balance,
    transfer,
    logList,
    logRecharge,
    logWithdrawal,
    logDetail,
    withdrawal
}
